package myky.com.doctorapp.model

import io.reactivex.Observable
import myky.com.doctorapp.api.ApiManager
import myky.com.doctorapp.base.BaseEntity
import myky.com.doctorapp.contract.FindDoctorByAreaContract
import myky.com.doctorapp.entity.AreaWrapperEntity
import myky.com.doctorapp.utils.RequestBodyBuilder

class FindDoctorByAreaModel : FindDoctorByAreaContract.Model {
    override fun findArea(): Observable<BaseEntity<AreaWrapperEntity.DataBean>> {
        val requestBodyBuilder = RequestBodyBuilder.Builder()
        requestBodyBuilder.params("version", "v1.0")
        val requestBody = requestBodyBuilder.build()
        return ApiManager.getApistore().findArea(requestBody)
    }
}
